package com.knight.study.patterns.tujie.visitor;


import com.knight.study.patterns.tujie.composite.FileTreatmentException;

import java.util.Iterator;

/**
 * @Author knight
 * @Date 2024/9/11 16:23
 */

public abstract class Entry implements Element{
    public abstract String getName();
    public abstract int getSize();
    public Entry add(Entry entry) throws FileTreatmentException {
        throw new FileTreatmentException();
    }
    public Iterator iterator() throws FileTreatmentException {
        throw new FileTreatmentException();
    }
    public String toString() {
        return getName() + "(" + getSize() + ")";
    }
}
